home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 September / PCWorld_2006-09_cd.bin / komercni software / zoner / zps8_cz.exe / {app} / HTMLPublish / compactPHP.zht / admin.php next >
Text File  |  2006-03-22  |  2KB  |  72 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=#{ENCODING}">
  5. <meta name="generator" content="Zoner Photo Studio 8">
  6. <link rel="stylesheet" type="text/css" href="image.css" title="displaysheet">
  7. <title>Spr├íva koment├í┼Ö┼»</title>
  8.  
  9. </head>
  10. <body>
  11.  
  12. <h2>Komentáře</h2><br>
  13. <?php
  14.  
  15. $location = "text";
  16. $all = opendir($location);
  17. while ($file = readdir($all))
  18. {
  19.  if (!is_dir($location.'/'.$file) and $file <> ".." and $file <> "." and $file <> "zpsfiles.md5") 
  20.  {
  21.   $files[]=$file;  
  22.  }
  23. }
  24. closedir($all);
  25. if ($files)
  26.      natcasesort($files);
  27.  
  28. $passw="";
  29. if (isset($_COOKIE['zpsgallery']))
  30.   $passw=$_COOKIE['zpsgallery'];
  31.  
  32. include("getpass.php");
  33.  
  34. if (strcmp($passw,"")==0 || !passwordvalid($passw))
  35. {
  36.   $form = <<<ENDH
  37.   <h4>Vlo┼╛te heslo pro administraci:</h4>
  38.   <form METHOD="POST" ACTION="setpass.php">
  39.   <input TYPE="PASSWORD" NAME="Password" SIZE="46" value="">
  40.   <input type=submit value="Odeslat">
  41.   </form>
  42.   <br>
  43. ENDH;
  44.   echo $form;
  45.   include_once("imgcmt1.php");
  46. }
  47. else
  48.   include_once("imgcmt2.php");
  49.  
  50. if ($files)
  51. foreach ($files as $file)
  52. {
  53.   echo "<h4>";
  54.   echo $file;
  55.   echo "</h4>";
  56.  
  57.   $id=substr($file,0,strlen($file)-4);
  58.   $comments=vshowcomments($id);
  59.   if (strcmp($comments,"")!=0)
  60.   {
  61.     echo "<div class=\"imagecomments\">";
  62.     echo $comments;
  63.     echo "</div>";
  64.   }
  65.   echo "<br>";
  66.  
  67. ?>
  68.  
  69. </body>
  70. </html>
  71.